package com.yy.job.spring;

import com.yy.job.common.dao.YYJobDOMapper;
import com.yy.job.common.dao.YYJobStepDOMapper;
import com.yy.job.common.service.impl.YYJobServiceImpl;
import com.yy.job.common.service.impl.YYJobStepServiceImpl;
import com.yy.job.core.run.process.IJobStepProcess;
import com.yy.job.service.IJobManager;
import com.yy.job.service.impl.JobDomainService;
import com.yy.job.service.impl.JobStepDomainService;

public class YYSpringBeanUtils {
	
	public static IJobManager getJobManager() {
		return (IJobManager) YYApplicationContextWrapper.service(IJobManager.class);
	}
	
	public static YYJobDOMapper getYYJobDOMapper() {
		return (YYJobDOMapper) YYApplicationContextWrapper.service(YYJobDOMapper.class);
	}
	
	public static YYJobStepDOMapper getYYJobStepDOMapper() {
		return (YYJobStepDOMapper) YYApplicationContextWrapper.service(YYJobStepDOMapper.class);
	}
	
	public static YYJobServiceImpl getYYJobService() {
		return (YYJobServiceImpl) YYApplicationContextWrapper.service(YYJobServiceImpl.class);
	}
	
	public static JobDomainService getJobDomainService() {
		return (JobDomainService) YYApplicationContextWrapper.service(JobDomainService.class);
	}
	
	public static JobStepDomainService getJobStepDomainService() {
		return (JobStepDomainService) YYApplicationContextWrapper.service(JobStepDomainService.class);
	}
	
	public static YYJobStepServiceImpl getYYJobStepService() {
		return (YYJobStepServiceImpl) YYApplicationContextWrapper.service(YYJobStepServiceImpl.class);
	}
	
	public static IJobStepProcess getJobStepProcess(String beanName) {
		return (IJobStepProcess) YYApplicationContextWrapper.bean(IJobStepProcess.class, beanName);
	}

}
